package defectsim.integrator;

public class IntegratorFactory {
	
	public enum IntegrationType {
		Trapezoidal,
		VelocityVerlet
	}
	
	public static Integrator createIntegrator(IntegrationType iType) {
		switch (iType) {
		case Trapezoidal:
			return new TrapezoidalIntegrator();
		case VelocityVerlet:
			return new VelocityVerletIntegrator();
		}
		throw new IllegalArgumentException("The integration type " + iType + " is not recognized.");
	}
}
